package cn.jiyun.controller;


import cn.jiyun.common.config.Result;
import cn.jiyun.entity.XmAuditbusiness;
import cn.jiyun.entity.XmSettled;
import cn.jiyun.service.IXmAuditbusinessService;
import cn.jiyun.service.IXmSettledService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-11-25
 */
@RestController
@RequestMapping("/xm-client/xm-auditbusiness")
public class XmAuditbusinessController {

    @Autowired
    private IXmAuditbusinessService xmAuditbusinessService;


    //    查询这个表的所有
    @RequestMapping("findAll")
    public Result findAll(Integer current, Integer pageSize, @RequestBody XmAuditbusiness xmAuditbusiness) {
        Page<XmAuditbusiness> xmSettledPage = xmAuditbusinessService.findAll(current, pageSize, xmAuditbusiness);
        return Result.ok(xmSettledPage);
    }


    // 修改审核表同意或者拒绝
    @RequestMapping("updateAudit")
    public Result updateAudit(@RequestBody XmAuditbusiness xmAuditbusiness) {
        xmAuditbusinessService.updateAudit(xmAuditbusiness);
        return Result.ok();
    }
}
